// pages/homePage/homePage.js
var app = getApp();
Page({
  /**
   * 页面的初始数据
   */
  data: {

    indicatorDots: true,
    autoplay: true,
    interval: 2000,
    duration: 1000,
    productType: []
   
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    // this.getUserLocation();
    //获取手机高度
    this.setData({
      navH: app.globalData.navHeight,
    })
    const self = this
    wx.loadFontFace({
      family: 'fonts',
      source: 'url("https://test.jwsxmall.com/jiweishengxian/VisbyCF-Bold.otf")',
      success(res) {
        console.log(res.status)
        self.setData({ loaded: true })
      },
      fail: function (res) {
        console.log(res.status)
      },
      complete: function (res) {
        console.log(res.status)
      }
    });
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    var that = this;
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    var that = this;
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },
  navBack: function () {
    wx.navigateBack({

    })
  },
  goInvoiceHis: function () {
    wx.navigateTo({
      url: '/pages/invoiceHis/invoiceHis',
    })
  },
  goInvoiceHelp: function () {
    wx.navigateTo({
      url: '/pages/invoiceHelp/invoiceHelp',
    })
  },
  goInvoiceTwo: function() {
    wx.navigateTo({
      url: '/pages/invoiceList/invoiceList'
    })
  },
})